]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
util: don't depend on the nautilus GSettings schema
authorCosimo Cecchi <cosimoc@gnome.org>
Fri, 23 Sep 2011 01:39:32 +0000 (21:39 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Wed, 19 Oct 2011 19:37:08 +0000 (15:37 -0400)
Without the desktop, even Nautilus hardcodes "Home" in all places
nowadays (except for the desktop itself). I think a run-time dependency
on nautilus being installed (GSettings will abort if the schema is not
found) is not worth it to keep compatibility with the desktop.

(Also, nautilus itself could probably hardcode "Home" for the desktop as
well and remove the preference).

https://bugzilla.gnome.org/show_bug.cgi?id=659895

src/shell-util.c

index bdf2330e4cf468dff06be69b02f042f206d4cd85..0f5e16463b3b5e048e25ee240ff98d478df4e627 100644 (file)
@@ -75,8 +75,6 @@ shell_util_get_file_display_name_if_mount (GFile *file)
   return ret;
 }
 
-#define HOME_NAME_SCHEMA        "org.gnome.nautilus.desktop"
-#define HOME_NAME_KEY           "home-icon-name"
 static char *
 shell_util_get_file_display_for_common_files (GFile *file)
 {
@@ -85,26 +83,11 @@ shell_util_get_file_display_for_common_files (GFile *file)
   compare = g_file_new_for_path (g_get_home_dir ());
   if (g_file_equal (file, compare))
     {
-      GSettings *settings;
-      char *name;
-
       g_object_unref (compare);
-
-      settings = g_settings_new (HOME_NAME_SCHEMA);
-      name = g_settings_get_string (settings, HOME_NAME_KEY);
-      g_object_unref (settings);
-
-      if (!(name && name[0]))
-        {
-          g_free (name);
-          return g_strdup (_("Home Folder"));
-        }
-      else
-        {
-          return name;
-        }
+      /* Translators: this is the same string as the one found in
+       * nautilus */
+      return g_strdup (_("Home"));
     }
-  g_object_unref (compare);
 
   compare = g_file_new_for_path ("/");
   if (g_file_equal (file, compare))